<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        html{
            perspective: 800px;
        }
        .wrapper{
            width: 400px;
            height: 400px;
            margin: 200px auto;
            /* background-color: #bfa; */
            /* 设置3D效果 */
            transform-style: preserve-3d;
            /* transform: rotateY(45deg) rotateX(45deg); */
        }
        .wrapper div{
            width: 400px;
            height: 400px;
            /* background-color: #bfa; */
            position: absolute;
            /* 设置透明效果 */
            opacity: .9;
        }
        .wrapper .box1{
            background-image: url(./img11.jpg);
            /* 设置旋转90度，并平移200像素 */
            transform: rotateY(90deg) translateZ(200px);
        }
        .wrapper .box2{
            background-image: url(./img2.jpg);
            transform: rotateY(-90deg) translateZ(200px);
        }
        .wrapper .box3{
            background-image: url(./img3.jpg);
            transform: rotateX(90deg) translateZ(200px);
        }
        .wrapper .box4{
            background-image: url(./img4.jpg);
            transform: rotateX(-90deg) translateZ(200px);
        }
        .wrapper .box5{
            background-image: url(./img5.jpg);
            transform: rotateY(180deg) translateZ(200px);
        }
        .wrapper .box6{
            background-image: url(./img6.jpg);
            transform: rotateY(0deg) translateZ(200px);
            /* z-index: 55; */
        }
        /* 设置动画帧 */
        @keyframes run{
            from{
                transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg);
            }
            to{
                transform: rotateX(720deg)  rotateZ(720deg) rotateY(720deg);
            }
        }
        /* 设置鼠标移动到容器时的效果 */
        .wrapper:hover{
            /* 设置动画效果 */
            /* 循环，匀速运动 */
            animation: run 10s infinite alternate linear;
        }
    </style>
</head>
<body>
    <div class="wrapper">
        <div class="box1"></div>
        <div class="box2"></div>
        <div class="box3"></div>
        <div class="box4"></div>
        <div class="box5"></div>
        <div class="box6"></div>
    </div>
</body>
</html>